package org.example.etl;

import org.example.etl.spark.real.SparkStreamingApplication;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
@MapperScan("org.example.etl.mapper")
public class EtlApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(EtlApplication.class, args);
        SparkStreamingApplication bean = run.getBean(SparkStreamingApplication.class);
        bean.SparkEtlStart();
    }

}
